/* generated using openapi-typescript-codegen -- do no edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { ArticleCommentDTO } from '../models/ArticleCommentDTO';
import type { ArticleCommentQueryDTO } from '../models/ArticleCommentQueryDTO';
import type { RPage_ } from '../models/RPage_';
import type { RString } from '../models/RString';

import type { CancelablePromise } from '../core/CancelablePromise';
import { OpenAPI } from '../core/OpenAPI';
import { request as __request } from '../core/request';

export class ArticleCommentControllerService {

    /**
     * @param requestBody
     * @returns RPage_ OK
     * @throws ApiError
     */
    public static getSubCommentsByCommentId(
        requestBody: ArticleCommentQueryDTO,
    ): CancelablePromise<RPage_> {
        return __request(OpenAPI, {
            method: 'POST',
            url: '/api/1.0/article-comments/sub-comments',
            body: requestBody,
            mediaType: 'application/json',
        });
    }

    /**
     * @param requestBody
     * @returns RPage_ OK
     * @throws ApiError
     */
    public static getCommentsByArticleId(
        requestBody: ArticleCommentQueryDTO,
    ): CancelablePromise<RPage_> {
        return __request(OpenAPI, {
            method: 'POST',
            url: '/api/1.0/article-comments/by-article',
            body: requestBody,
            mediaType: 'application/json',
        });
    }

    /**
     * @param requestBody
     * @returns RString OK
     * @throws ApiError
     */
    public static addComment(
        requestBody: ArticleCommentDTO,
    ): CancelablePromise<RString> {
        return __request(OpenAPI, {
            method: 'POST',
            url: '/api/1.0/article-comments/addComment',
            body: requestBody,
            mediaType: 'application/json',
        });
    }

}
